package com.example.rrr_map;

import org.json.JSONException;
import org.json.JSONObject;

public class User {
	
	public String name;
	public int attack;
	public int defense;
	public int sword;
	public int shield;
	public int points;
	public int level;
	
	
	
	
	public User(String name, int lev) {
		this.name = name;
		/*attack = 10;
		defense = 10;
		sword = 1;
		shield = 1;
		points = 0;*/
		this.level = lev;
	}
	
	public User(JSONObject obj) {
		try {
			this.name = obj.getString("name");
			this.level = obj.getInt("level");
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	public String getName() {
		return name;
	}
	
	public int getAttack() {
		return attack;
	}
	
	public int getDefense() {
		return defense;
	}
	
	public int getSword() {
		return sword;
	}
	
	public int getShield() {
		return shield;
	}
	
	public int getLevel() {
		return level;
	}
	
	public void setLevel(int lev) {
		level = lev;
	}
	
	public void setAttack(int num) {
		attack = num;
	}
	
	public void setDefense(int num) {
		defense = num;
	}
	
	public void setSword(int num) {
		sword = num;
	}
	
	public void setShield(int num) {
		shield = num;
	}
	
	
	
}
